<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:composition template="/shared/_layout.xhtml">
        <ui:define name="title">
            Espace d'administration de BooXtore.com
        </ui:define>
        <ui:define name="css">
            <h:outputStylesheet library="css" name="form.css"/>
        </ui:define>
        <ui:define name="content">
            <h1>
                Gestion des livres par auteurs
            </h1>
            <h:form>
                <p>
                    <h:outputLabel value="Livre" for="article"/>
                </p>
                <p>
                    <h:selectOneMenu label="Livre" id="article" value="#{libraryByAuthorsManager.article}">
                        <c:forEach items="#{libraryByAuthorsManager.articles}" var="entry">
                            <f:selectItem itemLabel="#{entry.name}" itemValue="#{entry.IDarticles}"/>
                        </c:forEach>
                    </h:selectOneMenu>
                </p>
                <p>
                    <h:outputLabel value="Auteurs" for="author"/>
                </p>
                <p>
                    <h:selectManyListbox label="Auteurs" id="author" value="#{libraryByAuthorsManager.author}">
                        <c:forEach items="#{libraryByAuthorsManager.authors}" var="entry">
                            <f:selectItem itemLabel="#{entry.name}" itemValue="#{entry.IDauthors}"/>
                        </c:forEach>
                    </h:selectManyListbox>
                </p>
                <p>
                    <h:commandButton action="#{libraryByAuthorsManager.update()}" value="Modifier"/>
                    <h:outputText value=" "/>
                    <h:link outcome="/index" class="back" value="Annuler"/>
                </p>
            </h:form>
        </ui:define>
    </ui:composition>
</html>